/*
 * @Title: 确认订单
 * @Created by: ycq 
 */
<template>
	<view >
		<IndexHead :config='pageConfig'></IndexHead>
		<view class="order">
			<view class="address" @click="chooseAddress">
				<image class="pos" src="/static/shop/pos.png" mode="" ></image>
				<text>请选择送货地址</text>
				<image class="more" src="/static/jiantou.png" mode=""></image>
			</view>
			<view class="goods" v-for="(item,index) in goodsData" :key='index'>
				<image class="goods-img" :src="item.img" mode=""></image>
				<view class="goods-right">
					<text class="goods-title">{{item.title}}</text>
					<text class="goods-type">{{item.type}}</text><text class="goods-num">X{{item.num}}</text>
					<text class="goods-price"><text class="money">￥</text>{{item.price}}</text>
				</view>
				<text class="goods-sum" style="color: #999999;">{{item.num}}件商品，计：<text style="color: #55A0FF;">￥{{item.price}}</text></text>
				<view class="ps">
					<text class="ps-label">配送费用：</text>
					<text class="freight">{{item.freight!=0?'￥'+item.freight:'免运费'}}</text>
				</view>
				
			</view>
			<view class="redBag">
				<text class="redBag-label">可使用红包 {{redMoney}}元</text>
				<image v-if="!useRedBag"  src="/static/shop/unchoose.png" mode="" @click="useRedbag()"></image>
				<image v-if="useRedBag" src="/static/shop/choose.png" mode="" @click="useRedbag()"></image>
			</view>
			<view class="gong">
				<text>共2件</text>
			</view>
		</view>
		<view class="bottom">
			<label class="num">共{{settleNum}}件</label>
			<view class="Settle">提交订单</view>
			<text class="bottom-label blue">￥{{settlePrice}}</text>
			<text class="bottom-label">实付款:</text>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				settlePrice:666,
				settleNum:2,
				redMoney:10,
				useRedBag:true,
				pageConfig:{
					common:{
						hasSearch:false, //显示整版搜索框
						hasTitle:true, //显示页面title
						hasMenu:false,
					},
					left:{
						showPos:false,
					},
					mid:{
						title:'确认订单' ,//页面title
						hasSearchMid:false //显示中间搜索框
					},
					right:{
						
					}
				},
				goodsData:[
					{
						img:'/static/banner.png',
						title:'宫廷古风中国风口红 长相思持久保湿防水',
						type:'浅蓝色官方旗舰店；L码；',
						num:1,
						price:233,
						freight:0,
					},
					// {
					// 	img:'/static/banner.png',
					// 	title:'发箍达菲熊雪莉玫史黛拉兔耳朵游玩可爱头饰',
					// 	type:'芭蕾兔发箍；',
					// 	num:1,
					// 	price:50,
					// 	freight:12,
					// }
				]
			}
		},
		methods: {
			useRedbag(){
				this.useRedBag = !this.useRedBag
			},
			chooseAddress(){
				uni.navigateTo({
					url:'../../my/myAddress/myAddress2/address2'
				})
			}
		},
		
	}
</script>

<style scoped>
	/* 订单主体 */
	.order{
		position: absolute;
		width: 750upx;
		height: calc(100vh - 110px - var(--status-bar-height));
		background: #FFFFFF;
		overflow: scroll;
		top: 130upx;
		/* margin-bottom: 100upx; */
	}
	/* 地址 */
	.address{
		width: 750upx;
		height: auto;
		display: flex;
		padding-top: 25upx;
		padding-bottom: 25upx;
		flex-direction: row;
		border-bottom: rgba(238,238,238,1.00) solid 1upx;
		justify-content: space-between;
	}
	.pos{
		width: 26upx;
		height: 32upx;
		margin-left: 30upx;
		
	}
	.address text{
		width: 610upx;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		height: 40upx;
		overflow: hidden;
		font-size: 28upx;
		color: #666666;
		line-height: 40upx;
	}
	.more{
		width: 26upx;
		height: 32upx;
		margin-right: 30upx;
	}
	/* 宝贝 */
	.goods{
		width: 750upx;
		height: auto;
		margin-top: 40upx;
		margin-bottom: 100upx;
		display: table;
		border-bottom: rgba(238,238,238,1.00) solid 16upx;
	}
	.goods:nth-child(n){
		margin-bottom: 0 ;
	}
	.goods-img{
		width: 196upx;
		height: 206upx;
		margin-left: 34upx;
		border-radius: 10upx;
		float: left;
	}
	.goods-right{
		width: 480upx;
		margin-right: 38upx;
		height: 206upx;
		float: right;
	}
	.goods-title{
		display: -webkit-box;
		margin-left: 28upx;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		height: 80upx;
		overflow: hidden;
		font-size: 28upx;
		color: #272222;
		margin-top: 30upx;
		line-height: 32upx;
	}
	.goods-type{
		height: 32upx;
		font-size: 24upx;
		margin-left: 30upx;
		color: #999999;
		background: rgba(246,246,246,1.00);
		padding: 4upx 10upx;
		float: left;
		line-height: 32upx;
	}
	.goods-num{
		font-size: 24upx;
		color: #999999;
		line-height: 32upx;
		height: 32upx;
		float: right;
	}
	.money{
		color: #55A0FF;font-size: 24upx;
		margin-top: 50upx;
		
		/* display: block; */
	}
	.goods-price{
		color: #55A0FF;
		font-size: 36upx;
		margin-top: 50upx;
		margin-left: 28upx;
		display: block;
		
	}
	.ps{
		width: 750upx;
		height: 40upx;
		margin-top: 320upx;
		margin-bottom: 30upx;
		padding-top: 20upx;
		border-top: rgba(238,238,238,1.00) solid 1upx;
	}
	.ps-label{
		margin-left: 34upx;
		font-size: 28upx;
		float: left;
	}	
	.freight{
		color: #999999;
		font-size: 24upx;
		margin-right: 28upx;
		float: right;
	}
	.goods-sum{
		/* width: 750upx; */
		height: 40upx;
		margin-top: 40upx;
		float: right;
		font-size: 24upx;
		margin-right: 28upx;
	}
	/* 红包 */		
	.redBag{
		width: 750upx;
		height: 80upx;
		line-height: 80upx;
	}
	.redBag-label{
		font-size: 28upx;
		margin-left: 34upx;
		float: left;
	}
	.redBag image{
		margin-top: 30upx;
		margin-right: 28upx;
		width: 26upx;
		float: right;
		height: 26upx;
	}
	.gong{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		background: rgba(238,238,238,1.00);
	}
	.gong text{
		float: right;
		font-size: 24upx;
		color: rgba(153,153,153,1.00);
		margin-right: 33upx;
		
	}
	/* 底部 */
	.bottom{
		width: 750upx;
		height: 98upx;
		background: #FFFFFF;
		position: fixed;
		z-index: 20upx;
		bottom: 0;
		box-shadow: 2px 1px 8px 1px #dcdcdc;
	}
	.Settle{
		width: 243upx;
		height: 98upx;
		background: #55A0FF;
		color: #FFFFFF;
		font-size: 34upx;
		text-align: center;
		line-height: 98upx;
		float: right;
		margin-left: 80upx;
	}
	.bottom-label{
		height: 98upx;
		display: block;
		text-align: center;
		float: right;
		line-height: 98upx;
		font-weight: bold;
		font-size: 32upx;
		margin-left: 10upx;
	}
	.blue{
		color: #0075EE;
	}
	.num{
		float: left;
		height: 98upx;
		line-height: 98upx;
		color: #999999;
		font-size: 26upx;
		margin-left: 18upx;
	}
	.choose-icon{
		width: 28upx;
		height: 28upx;
		margin-top: 35upx;
		float: left;
		margin-left: 29upx;
	}
	.jt{
		width: 18upx;
		height: 25upx;
		margin-top: 36upx;
		margin-left: 70upx;
	}
</style>
